package com.luo.backend.dto;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 验证验证码请求
 */
public class VerifyCodeRequest {
    
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;
    
    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = "\\d{6}", message = "验证码必须是6位数字")
    private String code;
    
    @NotBlank(message = "验证码类型不能为空")
    @Pattern(regexp = "register|reset_password|change_email", message = "验证码类型必须是: register, reset_password, change_email")
    private String type;
    
    // Constructors
    public VerifyCodeRequest() {
    }
    
    public VerifyCodeRequest(String email, String code, String type) {
        this.email = email;
        this.code = code;
        this.type = type;
    }
    
    // Getters and Setters
    public String getEmail() {
        return email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }
    
    public String getCode() {
        return code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }
    
    public String getType() {
        return type;
    }
    
    public void setType(String type) {
        this.type = type;
    }
}



